<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="app">
    <input type="button" :value="title" @click="fun()">
    <div v-show="show">
        <img src="../img/01.jpg">
    </div>
</div>
</body>
</html>
<script>
    new Vue({
        el: '#app',
        data: {
            title:'隐藏',
            show:true,
        },
        methods: {
            fun: function () {
                this.title = this.show ? "显示" : "隐藏";
                this.show = !this.show;
            }
        }
    })
</script>
